CommandInsertVehicle Class Reference

#include <CommandInsertVehicle.h>

Inheritance diagram for CommandInsertVehicle:

Command List of all members.

Public Member Functions

 CommandInsertVehicle (osg::Vec3 pos, OSGWindows *osgwind, string pathname, float scale)
bool execute ()
bool unexecute ()

Private Attributes

OSGWindows * osgwind_
Vehicle * vehicle
vector< TraffEduObject * > insertedObjs_

Detailed Description

Definition at line 8 of file CommandInsertVehicle.h.


Constructor & Destructor Documentation

CommandInsertVehicle::CommandInsertVehicle (  osg::Vec3  pos,
OSGWindows *  osgwind,
string  pathname,
float  scale
) 
 

A constructor. Initializes osgwind_ and creates a new vehicle object by using the parameter of pathname.

Parameters:
pos a osg::Vec3 argument.
osgwind an OSGWindows pointer.
pathname a string argument.
scale a float argument.

Definition at line 2 of file CommandInsertVehicle.cpp.

References OSGWindows::addObject(), TraffEduObject::getObjectGroup(), insertedObjs_, osgwind, osgwind_, TraffEduObject::setPosition(), Vehicle::setPositionAll(), and vehicle.


Member Function Documentation

bool CommandInsertVehicle::execute (   )  [virtual]
 

do the insertion of vehicle object operation.

Returns:
Operation success

Implements Command.

Definition at line 15 of file CommandInsertVehicle.cpp.

References OSGWindows::doAddGeode(), osgwind_, and vehicle.

bool CommandInsertVehicle::unexecute (   )  [virtual]
 

undo the insertion of vehicle object operation.

Returns:
Operation success

Implements Command.

Definition at line 23 of file CommandInsertVehicle.cpp.

References OSGWindows::doDeleteGeode(), osgwind_, and vehicle.


Member Data Documentation

vector<TraffEduObject*> CommandInsertVehicle::insertedObjs_ [private]
 

a private vector of TraffEduObjects. It holds the inserted vehicle objects.

Definition at line 28 of file CommandInsertVehicle.h.

Referenced by CommandInsertVehicle().

OSGWindows* CommandInsertVehicle::osgwind_ [private]
 

a private variable. It is initialized with the unique OSGWindows instance.

Definition at line 16 of file CommandInsertVehicle.h.

Referenced by CommandInsertVehicle(), execute(), and unexecute().

Vehicle* CommandInsertVehicle::vehicle [private]
 

a private variable. It is used to hold the created vehicle object.

Definition at line 22 of file CommandInsertVehicle.h.

Referenced by CommandInsertVehicle(), execute(), and unexecute().


The documentation for this class was generated from the following files:
Generated on Sun May 28 18:54:12 2006 for TraffEdu by  doxygen 1.4.6-NO